FROM registry.cn-hangzhou.aliyuncs.com/qingcloudtech/base-java:latest AS build

ENV APPLICATION qingcloud-auth
ENV PARAMS=""

ENV USERNAME="develop"
ENV JVM_OPTIONS=""
WORKDIR /app/service/$APPLICATION
COPY target/config  config
COPY target/$APPLICATION.jar .

ENV APP_OPTS="-Xms1024m -Xmx1024m -XX:+UseG1GC -XX:MaxMetaspaceSize=512m -Dsun.jnu.encoding=utf-8 -Duser.timezone=GMT+08 -Dfile.encoding=utf-8 \
--add-opens java.base/java.lang=ALL-UNNAMED \
--add-opens java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens java.base/java.io=ALL-UNNAMED \
--add-opens java.base/java.net=ALL-UNNAMED \
--add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.base/java.net=ALL-UNNAMED \
--add-opens java.base/java.util.concurrent=ALL-UNNAMED \
--add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED \
--add-opens java.base/java.math=ALL-UNNAMED \
"

ENTRYPOINT ["sh","-c","java ${APP_OPTS} -jar qingcloud-auth.jar"]
LABEL com.qingcloud.version=2.1.1
LABEL com.qingcloud.name=qingcloudtech/qingcloud-auth